package MyFramePro.Exception;

import MyFramePro.Enums.AppHttpCodeEnum;

/**
 * 这里是异常处理类
 */
public class SystemException extends RuntimeException{

    /**
     * 状态码
     */
    private int code;

    /**
     * 异常信息
     */
    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public SystemException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }
    
}
